﻿using UnityEngine;
using System.Collections;
using UnityEditor;
using UnityEditor.Extension;
using UnityEditor.UI;
using System.IO;
using System;
using System.Reflection.Extension;
using System.Extension;

[CustomEditor(typeof(SubjectiveRawImage))]
public class SubjectiveRawImageInspector : RawImageEditor
{
    SerializedProperty subject;
    protected override void OnEnable()
    {
        base.OnEnable();
        subject = serializedObject.FindProperty("m_subject");
    }

    public override void OnInspectorGUI()
    {
        serializedObject.Update();
        EditorGUILayout.PropertyField(subject);
        serializedObject.ApplyModifiedProperties();
        base.OnInspectorGUI();
    }

    [MenuItem("GameObject/UI/Subjective/RawImage")]
    static void CreateSubjectiveText()
    {
        GameObjectMenu.CreateNewControlInHierarchy("RawImage", typeof(CanvasRenderer), typeof(SubjectiveRawImage));
    }
}
